import { Component,OnInit } from '@angular/core';
import { AlertComponent } from './common/components/alert/alert.component';
import { PopupService }  from '@/app/common/components/popup/popup.service';
import { MessageService }  from '@/app/common/components/message/service/message.service';

@Component({
  selector: 'app-root',
  //templateUrl: './app.component.html',
  template:'<router-outlet></router-outlet>',
  styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
  public title:string;
  num=0;
  constructor(private popup: PopupService, public messageService:MessageService){
    this.title="dada";
    // setTimeout(()=>{
    //   this.setTitle();
    // },3000);
  }

  ngOnInit() {

  }

  /**自定义弹窗设置标题 */
  setTitle(){
    this.popup.openPopup({data:'弹窗'});
  }

  /**打开自定义弹窗 */
  openPopup(){
    console.log(1111);
    this.popup.openPopup({data:'弹窗'});
  }

  /**显示自定义弹窗内容 */
  openMessage(){
    console.log('信息显示');
    this.messageService.open('');
  }

}
